import Opt from '@/components/dt/info/Opt.js'
let _this = null
class Column extends Opt {

  constructor(vm) {
    super()
    _this = vm
    this.build()
  }

  build() {
    this.createAll()
    this.opts.push(...this.all)
  }

  createAll() {
    this.all = [
      {
        title: '公司',
        field: 'caseLocationTwo',
        minWidth: 250,
        // tree: true
      },
      {
        title: '城市',
        field: 'city',
        minWidth: 180,
      },
      {
        title: '案场名称',
        field: 'housesName',
        minWidth: 180,
        cell: (item) => {
          return {
            btn: [{
              title: item.housesName,
              event: 'getHouseList',
              data: item.housesId
            }]
          }
        }
      },
      {
        title: '首次申请日期',
        field: 'firstOpenTime',
        minWidth: 180,
      },
      {
        title: '剩余楼栋',
        field: 'buildingCount',
        minWidth: 180,
      },

      {
        title: '认购',
        align: 'center',
        children: [{
          title: '套数',
          field: 'subscriptionCount',
          minWidth: 150,
        },
        {
          title: '面积（㎡）',
          field: 'subscriptionArea',
          minWidth: 150,
        },
        {
          title: '金额（元）',
          field: 'subscriptionAmount',
          minWidth: 150,
        }, ]
      },

      {
        title: '签约',
        align: 'center',
        children: [{
          title: '套数',
          field: 'contractCount',
          minWidth: 150,
        },
        {
          title: '面积（㎡）',
          field: 'contractArea',
          minWidth: 150,
        },
        {
          title: '签约金额（元）',
          field: 'contractAmount',
          minWidth: 150,
        }, ]
      },
    ]
  }

}

export default Column